// 定义全部接口返回数据都拥有ts类型
export interface ResponseData {
    code: number
    message: string
}

// 定义书籍类型
export interface Book {
    id?: number | null;
    title: string;
    author: string;
    publishedYear: number;
    createTime?: string;
    updateTime?: string;
    coverUrl: string; // 新增封面字段
}


//数组包含全部的书籍信息
export type Records = Book[]

// 定义书籍分页列表接口返回数据类型
export interface BookResponseData extends ResponseData {
    data: {
        records: Records
        total: number
        size: number
        current: number
        pages: number
    }
}

// 定义书籍详情接口返回数据类型
export interface BookDetailResponseData extends ResponseData {
    data: Book
}
